import { Component, OnInit, Output, EventEmitter} from '@angular/core';



@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {
  // 输出参数
  @Output() toggle = new EventEmitter<void>();

  // 主题切换输出
  @Output() toggleDaekTheme = new EventEmitter<boolean>();

  constructor() {}

  ngOnInit() {
  }
  // 点击图标打开侧边栏
  openSidebar(){
    this.toggle.emit();
  }
  // 发射主题切换
  onChange(checked:boolean){
    this.toggleDaekTheme.emit(checked);
  }

}
